package com.dddd.blog.api.post.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 
 * </p>
 *
 * @author dddd
 * @since 2022-02-27
 */
@TableName("bms_comment")
@ApiModel(value = "Comment对象", description = "")
@Data
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("主题id，可以是文章id")
    private Long topicId;

    @ApiModelProperty("主题类型")
    private String topicType;

    @ApiModelProperty("评论内容")
    private String content;

    @ApiModelProperty("评论者id")
    private Long fromId;

    @ApiModelProperty("支持数")
    private Integer supportCount;

    @ApiModelProperty("反对数")
    private Integer opposeCount;

    @ApiModelProperty("评论时间")
    private LocalDateTime createTime;

    @ApiModelProperty("是否删除")
    private Integer isAvailable;


    @Override
    public String toString() {
        return "Comment{" +
            "id=" + id +
            ", topicId=" + topicId +
            ", topicType=" + topicType +
            ", content=" + content +
            ", fromId=" + fromId +
            ", supportCount=" + supportCount +
            ", opposeCount=" + opposeCount +
            ", createTime=" + createTime +
            ", isAvailable=" + isAvailable +
        "}";
    }
}
